"""
paw.py --                                                                                            
                                                                                                                                                                                                        
It sets a table paw's geometric properties.                                              
                                                                                                                                                                                                            
Date of creation: 2007-03-17                                                                        
                                                                                                                                                                                                
Copyright  Robotics and Automation Group, Pontificia Universidad Javeriana - Cali.                  
    Freddy Naranjo Perez, fnaranjo@puj.edu.co                                                                   
    Antonio Alejandro Matta Gomez amatta@puj.edu.co                                      
    Julian David Colorado, jdcolorado@puj.edu.co                           
    Juan Camilo Acosta Mejia, jcacosta@puj.edu.co                                    
                                                                                                                                                                                                        
See the file "license.terms" for information on usage and redistribution of this file, and for a    
DISCLAIMER OF ALL WARRANTIES.
"""

import vtk

class Paw:
  def __init__( self, ren, x, y, z, posx, posy, posz, lighting, color ):
        """ Inits a paw's figure and its associated texture"""
        
        #setting the paw geometric parameters.
        self.paw = vtk.vtkCubeSource()
        self.paw.SetXLength( x )
        self.paw.SetYLength( y )
        self.paw.SetZLength( z ) 
        self.pawMapper = vtk.vtkPolyDataMapper()
        self.pawMapper.SetInputConnection(self.paw.GetOutputPort())
        self.pawActor = vtk.vtkActor()
        self.pawActor.SetMapper(self.pawMapper)
        self.pawActor.AddPosition( posx, posy, posz )
        #Type of representation.
        self.pawActor.GetProperty().SetRepresentationToSurface ()
        self.pawActor.GetProperty().SetInterpolationToFlat( )
         #Lighting Properties.
        self.pawActor.GetProperty().SetOpacity( lighting[0] )
        self.pawActor.GetProperty().SetAmbient( lighting[1] )
        self.pawActor.GetProperty().SetDiffuse(  lighting[2] )
        self.pawActor.GetProperty().SetSpecular(  lighting[3] )
        self.pawActor.GetProperty().SetSpecularPower(  lighting[4] )     
        # Color Properties.
        self.pawActor.GetProperty().SetAmbientColor( color[0] )
        self.pawActor.GetProperty().SetDiffuseColor( color[1] )
        self.pawActor.GetProperty().SetSpecularColor( color[2] )
        
   
    
        
    
    

        
        
            
        
    

    
  
  